package learn.listener;

import org.springframework.boot.ConfigurableBootstrapContext;
import org.springframework.boot.SpringApplicationRunListener;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @Description:
 * @Author yxc
 * @Date 2022/1/15
 */
public class MyApplicationRunListener implements SpringApplicationRunListener {

    @Override
    public void starting(ConfigurableBootstrapContext bootstrapContext) {
        System.out.println("MyApplicationRunListener... starting");
    }


    @Override
    public void contextPrepared(ConfigurableApplicationContext context) {
        System.out.println("MyApplicationRunListener... contextPrepared");
    }
    @Override
    public void contextLoaded(ConfigurableApplicationContext context) {
        System.out.println("MyApplicationRunListener... contextLoaded");
    }
    @Override
    public void started(ConfigurableApplicationContext context) {
        System.out.println("MyApplicationRunListener... started");
    }
    @Override
    public void running(ConfigurableApplicationContext context) {
        System.out.println("MyApplicationRunListener... running");
    }
    @Override
    public void failed(ConfigurableApplicationContext context, Throwable exception) {
        System.out.println("MyApplicationRunListener... failed");
    }
}
